const http = require('http');
const io = require('socket.io');

let server = http.createServer((req,res)=>{

});
server.listen(8080)
let wsServer = io.listen(server);

wsServer.on('connection',sock=>{
  //sock.emit // 发送
  //sock.on //接收
  sock.on('abc',function(a,b,c){
    console.log(a,b,c);
  });
  setInterval(function(){sock.emit('t',new Date().getTime())},1000);
});
